﻿<%@ Page Title="耗材汇总统计(低值)" Language="C#" MasterPageFile="~/Master/MasterPage_New.master" 
    AutoEventWireup="true" CodeBehind="GoodsPSLStatistics_DZ.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.NewReport.GoodsPSLStatistics_DZ" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="~/Common/AreaControls.ascx" TagName="AreaControl" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <script language="javascript" type="text/javascript">
        function document.onkeydown() {
            //使用document.getElementById获取到按钮对象
            var btnQuery = document.getElementById('<%=btnQuery.ClientID%>');
            if (event.keyCode == 13) {
                btnQuery.click();
                event.returnValue = false;
            }
        }

        function ShowImg() {
            var img = document.getElementById("ctl00_ContentPlaceHolder1_divTable");
            var button = document.getElementById("btnShowImg");

            if (img.style.display == 'block') {
                img.style.display = 'none';
                button.value = '显示县区数据';
            }
            else {
                img.style.display = 'block';
                button.value = '隐藏县区数据';
            }
        }
    </script>

    <div id="tabnav">
        <ul>
            <li><a href="GoodsPSLStatistics.aspx">耗材汇总统计(高值)</a></li>
            <li class="active"><a href="#">耗材汇总统计(低值)</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr class="ltlAdvance">
                            <td align="right">
                                <asp:Label ID="lblGoodsID" runat="server" Text="流水号："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtGoodsID" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblGoodsName" runat="server" Text="产品名称："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtGoodsName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblOutLookC" runat="server" Text="规格："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtOutLookC" runat="server"></asp:TextBox>
                            </td>
                             <td align="right">
                                <asp:Label ID="lblProduceCompany" runat="server" Text="生产企业："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtCompany_SC" runat="server"></asp:TextBox>
                            </td>
                        </tr>                        
                    </table>
                </td>
                <td width="100px">
                    <hz:HzButton ID="btnQuery" runat="server" Text="查  询" OnClick="btnQuery_Click" CssClass="btn" />
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwGoodsTotal" runat="server" AutoGenerateColumns="False" CssClass="mainlist"
        AllowSorting="True" EmptyDataText="暂无符合条件的数据！" 
        onrowcommand="gvwGoodsTotal_RowCommand">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1)%></ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:BoundField DataField="GoodsID" HeaderText="流水号" />
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" ReadOnly="true" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格" ReadOnly="true" Visible="false" />
            <asp:TemplateField HeaderText="规格">
                <ItemTemplate>
                    <asp:Label ID="aa" runat="server" ToolTip='<%# Eval("Outlookc")%>'><%# HZ.Supervise.Web.Function.SubStr(Eval("Outlookc"))%></asp:Label>
                </ItemTemplate>
                <HeaderStyle Width="130px" />
            </asp:TemplateField>
            <asp:BoundField DataField="Unit" HeaderText="采购单位" />
            <asp:BoundField DataField="CompanyName_TB" HeaderText="生产企业" ReadOnly="true" />
            <asp:BoundField DataField="Price" HeaderText="采购价" />
            <asp:TemplateField HeaderText="采购金额">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnP" runat="server" CommandName="lbnP" CausesValidation="True"
                        CommandArgument='<%#Eval("GoodsID") %>' Text='<%#Eval("PurchaseAmount")%>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="配送金额">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnD" runat="server" CommandName="lbnD" CausesValidation="True"
                        CommandArgument='<%#Eval("GoodsID") %>' Text='<%#Eval("DistributeAmount")%>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="入库金额">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnW" runat="server" CommandName="lbnW" CausesValidation="True"
                        CommandArgument='<%#Eval("GoodsID") %>' Text='<%#Eval("WarehouseAmount")%>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="退货金额">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnR" runat="server" CommandName="lbnR" CausesValidation="True"
                        CommandArgument='<%#Eval("GoodsID") %>' Text='<%#Eval("ReturnAmount")%>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PurchaseAmount" HeaderText="采购金额" Visible="false" />
            <asp:BoundField DataField="DistributeAmount" HeaderText="配送金额" Visible="false" />
            <asp:BoundField DataField="WarehouseAmount" HeaderText="入库金额" Visible="false" />
            <asp:BoundField DataField="ReturnAmount" HeaderText="退货金额" Visible="false" />
        </Columns>
    </asp:GridView>
    <div class="page">
        <span style="width: 30%; float: left; text-align: left">
            <hz:HzButton ID="HzButton1" runat="server" CssClass="btn" Text="导出数据" OnClick="HzButton1_Click" />
        </span><span style="width: 70%; text-align: right; float: right">
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
            </webdiyer:AspNetPager>
        </span>
    </div>
    <br />
    <br />
    <div class="listip">
        <ul>
            <li>统计:<asp:Label ID="lblCount" runat="server"></asp:Label></li>
        </ul>
    </div>
</asp:Content>
